﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using TextRPG.Models.Skills;

namespace TextRPG.Models
{
    public class RPGContext : DbContext
    {
        public DbSet<Item> Items { get; set; }
        public DbSet<Inventory> Inventorys { get; set; }
        public DbSet<Character> Characters { get; set; }
        public DbSet<ItemInventoryRelation> ItemInventoryRelations { get; set; }
        public DbSet<Modifier> Modifiers { get; set; }
        public DbSet<ItemType> ItemTypes { get; set; }
        public DbSet<ItemModifierRelation> ItemModifierRelations { get; set; }
        public DbSet<ArmorClass> ArmorClasses { get; set; }
        public DbSet<WeaponSubClass> WeaponSubClasses { get; set; }
        public DbSet<WeaponClass> WeaponClasses { get; set; }
        public DbSet<DamageType> DamageTypes { get; set; }
        public DbSet<ItemDefinition> ItemDefinitions { get; set; }
        public DbSet<School> Schools { get; set; }
        public DbSet<Enemy> Enemies { get; set; }
        public DbSet<Skill> Skills { get; set; }
        public DbSet<CharacterElement> CharacterElements { get; set; }
        public DbSet<EquipmentLimitation> EquipmentLimitations { get; set; }
        public DbSet<DamageTypeSkill> DamageTypeSkills { get; set; }
        public DbSet<Target> Targets { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }
}
